Extending Design by Contract for Aspect-Oriented Programming

نویسندگان

  • David H. Lorenz
  • Therapon Skotiniotis
چکیده

Design by Contract (DbC) and runtime enforcement of program assertions enables the construction of more robust software. It also enables the assignment of blame in error reporting. Unfortunately, there is no support for runtime contract enforcement and blame assignment for Aspect-Oriented Programming (AOP). Extending DbC to also cover aspects brings forward a plethora of issues related to the correct order of assertion validation. We show that there is no generally correct execution sequence of object assertions and aspect assertions. A further classification of aspects as agnostic, obedient, or rebellious defines the order of assertion validation that needs to be followed. We describe the application of this classification in a prototyped DbC tool for AOP named CONA, where aspects are used for implementing contracts, and contracts are used for enforcing assertions on aspects.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Expressing Design by Contract Principles using Aspects

This thesis deals with two methodologies in software construction: Aspect Oriented Programming and Design by Contract. It was already claimed that the design by contract methodology is an aspect of the software system. As such, a contract can be expressed in AOP terminology, and hence could be enforced using an aspect oriented based tool. The work presented here describes the enforcement proces...

متن کامل

An Aspect-Oriented Infrastructure for Design by Contract in Java

Design by Contract was first introduced in the Eiffel programming language to address the reliability concern in Object-Oriented Software Development, namely on module interaction. On the other hand, Aspect-Oriented Software Development aims at providing a means to identify, modularise and compose cross-cutting concerns, which classical approaches for software development can not modularise. Th...

متن کامل

Design by Contract in .NET Using Aspect Oriented Programming

Most software is being implemented using imperative programming techniques. However, for certain problem domains declarative code has proven to be more expressive, easier to understand and more compact than its imperative counterpart. Aspect Oriented Programming (AOP) seems to be a promising approach for intermixing imperative program code with declarative aspect information using an aspect wea...

متن کامل

Modifying Contracts with Larissa Aspects

This paper combines two successful techniques from software engineering, aspect-oriented programming and design-by-contract, and applies them in the context of reactive systems. For the aspect language Larissa and contracts expressed with synchronous observers, we show how to apply an aspect asp to a contract C and derive a new contract C′, such that for any program P which fulfills C, P with a...

متن کامل

Assertion with Aspect

Programmers use assertion to enforce design by contract. However, in Object-Oriented Programming, assertion has few drawbacks. One drawback is that assertion may prevent the reuse of a class. Another is that programmers cannot express assertion about inter-object relations. Using Aspect-Oriented Programming technique, which enables to describe a crosscutting concern in one module, programmers c...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • CoRR

دوره abs/cs/0501070  شماره 

صفحات  -

تاریخ انتشار 2005